﻿@model YBBEST.Office365Portal.MvcWebRole.ViewModels.DocumentLibraryViewModel
@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
    Details</h2>
<table>
    <tr>
        <th colspan="2">
            Title
        </th>
    </tr>
    <tr>
        <td colspan="2">
            @Html.DisplayFor(model => model.ListTitle)
        </td>
    </tr>
    <tr>
        <th colspan="2">
            Documents contained in list
        </th>
    </tr>
    @foreach (var item in Model.ListItems)
    {
        <tr>
            <td>
                @Html.DisplayTextFor(m => item)
            </td>
            <td>
                @Html.ActionLink("Check out file","Checkout",new {url=Model.ListTitle,file=item})
            </td>
        </tr>
    }
</table>

@using (Html.BeginForm("Upload", "Copy", FormMethod.Post, new {enctype="multipart/form-data"})){ 

     <input type="file" name="fileBase" /><br />
    @Html.HiddenFor(m => m.ListTitle)
    <input type="submit" name="Submit" id="Submit" value="Upload" />
}

